<!--{include header.htm}-->

<div class="width">
	<form action="?conf-mail.htm" method="post" id="conf_form">
		<input type="hidden" name="FORM_HASH" value="{FORM_HASH}" />
		<div class="div" style="width: 700px;">
			<div class="header">邮件发送方式</div>
			<div class="body">
				<dl>
					<dt style="width: 80px;"><label for="app_name">发送方式：</label></dt>
					<dd>$input[sendtype]</dd>
				</dl>
			</div>
		</div>
		
		<div class="div" style="width: 700px;">
			<div class="header">SMTP设置 <span style="font-weight: normal;">(用于发送EMAIL，填写多个，系统会随机选取)</span></div>
			<div class="body">
				<table id="smtplist" width="100%">
					<tr class="header">
						<td width="50">删除</td>
						<td>邮箱</td>
						<td>SMTP主机</td>
						<td>端口</td>
						<td>账号</td>
						<td>密码</td>
					</tr>
					<!--{loop $smtplist $k $mail}-->
					<tr>
						<td><input type="checkbox" name="delete[]" value="$k" size="32" /></td>
						<td><input type="text" name="email[$k]" value="$mail[email]" size="32" /></td>
						<td><input type="text" name="host[$k]" value="$mail[host]" size="16" /></td>
						<td><input type="text" name="port[$k]" value="$mail[port]" size="4" /></td>
						<td><input type="text" name="user[$k]" value="$mail[user]" size="8" /></td>
						<td><input type="text" name="pass[$k]" value="$mail[pass]" size="8" /></td>
					</tr>
					<!--{/loop}-->
					<tr>
						<td></td>
						<td><input type="text" name="email[]" value="" size="32" /></td>
						<td><input type="text" name="host[]" value="" size="16" /></td>
						<td><input type="text" name="port[]" value="25" size="4" /></td>
						<td><input type="text" name="user[]" value="" size="8" /></td>
						<td><input type="text" name="pass[]" value="" size="8" /></td>
					</tr>
				</table>
				<div><a href="javascript:void(0)" id="addsmtp">[+]添加SMTP账号</a></div>
			</div>
		</div>
		
		<dt></dt>
		<dd>
			<input type="submit" class="button bigblue" id="conf_submit" value="确认设置" />
			<input type="button" class="button biggrey" value="返回基本设置" onclick="window.location='?conf-base.htm'" />
			<div id="notice" class="notice" style="display: none;"></div>
		</dd>
	</form>
</div>

<!--{include footer.htm}-->

<script type="text/javascript">
$('#conf_submit').click(function() {
	$('#conf_form').submit();
	return false;
});

$('#addsmtp').click(function() {
	for(var i=0; i<3; i++) {
		$('#smtplist tr:last-child').clone().appendTo('#smtplist').find('input').val('');
	}
});

<!--{loop $error $k $v}-->
<!--{if $v}-->
	$('#$k').alert('$v');
<!--{/if}-->
<!--{/loop}-->

<!--{if !empty($_POST)}-->
<!--{if empty($error)}-->
	$('#notice').html('编辑成功！').show();
<!--{else}-->
	$('#notice').html('编辑失败！').show();
<!--{/if}-->
<!--{/if}-->

</script>
</body>
</html>